package com.ruoyi.mall.pms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.pms.mapper.PmsProductSkuMapper;
import com.ruoyi.mall.pms.domain.PmsProductSku;
import com.ruoyi.mall.pms.service.IPmsProductSkuService;

/**
 * 商品skuService业务层处理
 * 
 * @author xuxing
 * @date 2021-02-05
 */
@Service
public class PmsProductSkuServiceImpl implements IPmsProductSkuService 
{
    @Autowired
    private PmsProductSkuMapper pmsProductSkuMapper;

    /**
     * 查询商品sku
     * 
     * @param id 商品skuID
     * @return 商品sku
     */
    @Override
    public PmsProductSku selectPmsProductSkuById(Long id)
    {
        return pmsProductSkuMapper.selectPmsProductSkuById(id);
    }

    /**
     * 查询商品sku列表
     * 
     * @param pmsProductSku 商品sku
     * @return 商品sku
     */
    @Override
    public List<PmsProductSku> selectPmsProductSkuList(PmsProductSku pmsProductSku)
    {
        return pmsProductSkuMapper.selectPmsProductSkuList(pmsProductSku);
    }

    /**
     * 新增商品sku
     * 
     * @param pmsProductSku 商品sku
     * @return 结果
     */
    @Override
    public int insertPmsProductSku(PmsProductSku pmsProductSku)
    {
        return pmsProductSkuMapper.insertPmsProductSku(pmsProductSku);
    }

    /**
     * 修改商品sku
     * 
     * @param pmsProductSku 商品sku
     * @return 结果
     */
    @Override
    public int updatePmsProductSku(PmsProductSku pmsProductSku)
    {
        return pmsProductSkuMapper.updatePmsProductSku(pmsProductSku);
    }

    /**
     * 批量删除商品sku
     * 
     * @param ids 需要删除的商品skuID
     * @return 结果
     */
    @Override
    public int deletePmsProductSkuByIds(Long[] ids)
    {
        return pmsProductSkuMapper.deletePmsProductSkuByIds(ids);
    }

    /**
     * 删除商品sku信息
     * 
     * @param id 商品skuID
     * @return 结果
     */
    @Override
    public int deletePmsProductSkuById(Long id)
    {
        return pmsProductSkuMapper.deletePmsProductSkuById(id);
    }
}
